package com.core.aspectj;

import android.app.Application;
import android.content.Context;
import android.content.Intent;

public class Lite {


    private static boolean userAuth;

    private static Context appContext;
    public static final Context getAppContext(){
        return  appContext;
    }
    public static void install(Application application, Class<?> _loginActivity) {
        appContext = application.getApplicationContext();
        loginActivity = _loginActivity;
    }

    public static boolean isUserAuth() {
        return userAuth;
    }

    public static void setUserAuth(boolean userAuth) {
        Lite.userAuth = userAuth;
    }

    private static Class<?> loginActivity;

    public static void startLoginActivity() {
        Intent i = new Intent(appContext,loginActivity);
        i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK| Intent.FLAG_ACTIVITY_CLEAR_TOP);
        appContext.startActivity(i);
    }

    public static void setLoginActivity(Class<?> loginActivity) {
        Lite.loginActivity = loginActivity;
    }
}
